package com.jiayou.system.entity;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 系统权限表
 * </p>
 *
 * @author lishuang
 * @since 2021-07-19
 */
@ApiModel(value = "SysPermission对象", description = "系统权限表")
class SysPermission : Model<SysPermission>() {

    @TableId("ID")
    var id: String? = null

    @TableField("CODE")
    var code: String? = null

    @ApiModelProperty(value = "许可名称")
    @TableField("NAME")
    var name: String? = null

    @ApiModelProperty(value = "类型：文件夹1,菜单2,资源3,其他文件夹4")
    @TableField("TYPE")
    var type: Int? = null

    @ApiModelProperty(value = "图标")
    @TableField("ICON")
    var icon: String? = null

    @ApiModelProperty(value = "是否无效:是1，否0")
    @TableField("IS_DISABLE")
    var isDisable: Int? = null

    @ApiModelProperty(value = "创建人编码")
    @TableField("CREATE_BY")
    var createBy: String? = null

    @ApiModelProperty(value = "创建人名称")
    @TableField("CREATE_NAME")
    var createName: String? = null

    @ApiModelProperty(value = "创建时间")
    @TableField("CREATE_TIME")
    var createTime: LocalDateTime? = null

    @ApiModelProperty(value = "数据所属部门code")
    @TableField("SYS_ORG_CODE")
    var sysOrgCode: String? = null

    @ApiModelProperty(value = "修改人名称")
    @TableField("UPDATE_NAME")
    var updateName: String? = null

    @ApiModelProperty(value = "更新时间")
    @TableField("UPDATE_TIME")
    var updateTime: LocalDateTime? = null

    @ApiModelProperty(value = "删除标记")
    @TableField("IS_DELETE")
    var isDelete: Boolean? = null

    @ApiModelProperty(value = "修改人代码")
    @TableField("UPDATE_BY")
    var updateBy: String? = null

    @ApiModelProperty(value = "数据所属公司code")
    @TableField("SYS_COMPANY_CODE")
    var sysCompanyCode: String? = null

    @ApiModelProperty(value = "删除人代码")
    @TableField("DELETE_BY")
    var deleteBy: String? = null

    @ApiModelProperty(value = "删除时间")
    @TableField("DELETE_TIME")
    var deleteTime: LocalDateTime? = null

    @ApiModelProperty(value = "删除人名称")
    @TableField("DELETE_NAME")
    var deleteName: String? = null

    @ApiModelProperty(value = "上级id")
    @TableField("PARENT_ID")
    var parentId: String? = null

    @ApiModelProperty(value = "序号")
    @TableField("XH")
    var xh: Int? = null


    override fun pkVal(): Serializable? {
        return id
    }

    override fun toString(): String {
        return "SysPermission{" +
                "id=" + id +
                ", code=" + code +
                ", name=" + name +
                ", type=" + type +
                ", icon=" + icon +
                ", isDisable=" + isDisable +
                ", createBy=" + createBy +
                ", createName=" + createName +
                ", createTime=" + createTime +
                ", sysOrgCode=" + sysOrgCode +
                ", updateName=" + updateName +
                ", updateTime=" + updateTime +
                ", isDelete=" + isDelete +
                ", updateBy=" + updateBy +
                ", sysCompanyCode=" + sysCompanyCode +
                ", deleteBy=" + deleteBy +
                ", deleteTime=" + deleteTime +
                ", deleteName=" + deleteName +
                ", parentId=" + parentId +
                ", xh=" + xh +
                "}"
    }
}
